package user.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.entity.Menu;
import org.springframework.stereotype.Service;
import user.mapper.MenuMapper;

import javax.annotation.Resource;
import java.util.List;


@Service
public class MenuService {

    @Resource
    private MenuMapper menuMapper;


    public List<Menu> getMenu(Integer roleId) {
        return menuMapper.selectList(new QueryWrapper<Menu>().inSql("id","select menu_id from menu_role where role_id = "+roleId));
    }
}
